﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
	xmlns:interlink="clr-namespace:HSS.Interlink"
	xmlns:System="clr-namespace:System;assembly=mscorlib">

	<!-- MergedDictionaries -->
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="/HSS.Interlink;component/themes/WindowSizerThumbStyle.xaml" />
	</ResourceDictionary.MergedDictionaries>

	<!-- DialogCloseButton -->
	<Style TargetType="interlink:DialogCloseButton">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="interlink:DialogCloseButton">
					<Grid>

						<VisualStateManager.VisualStateGroups>
							<!-- FocusStates -->
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Unfocused"/>
								<VisualState x:Name="Focused"/>
							</VisualStateGroup>
							<!-- CommonStates -->
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GoldenGlow" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverGlow" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonColor" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedButtonColor" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="XPath">
											<EasingColorKeyFrame KeyTime="0" Value="White"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="XPath">
											<EasingColorKeyFrame KeyTime="0" Value="White"/>
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverGlow" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonColor" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedButtonColor" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GoldenGlow" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="GoldenGlow">
											<EasingDoubleKeyFrame KeyTime="0" Value="0.017"/>
										</DoubleAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="PressedBackColor">
											<EasingColorKeyFrame KeyTime="0" Value="#2E000000"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="PressedBackColor">
											<EasingColorKeyFrame KeyTime="0" Value="#AF0C0100"/>
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled"/>
								<VisualState x:Name="Normal"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>

						<!-- HoverGlow -->
						<Rectangle x:Name="HoverGlow" Height="Auto" Width="Auto" RadiusX="8" RadiusY="8" Margin="-2" Visibility="Collapsed">
							<Rectangle.Fill>
								<RadialGradientBrush Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5" GradientOrigin="0.5,0.5">
									<GradientStop Color="#CFF2523E" Offset="0"/>
									<GradientStop Color="#CFF2523E" Offset="1"/>
								</RadialGradientBrush>
							</Rectangle.Fill>
							<Rectangle.Effect>
								<BlurEffect Radius="8"/>
							</Rectangle.Effect>
						</Rectangle>

						<!-- ButtonColor -->
						<Border x:Name="ButtonColor" BorderBrush="#9F000000" BorderThickness="1,0,1,1" CornerRadius="0,0,4,4" Visibility="Visible" >

							<!-- Shade -->
							<Border x:Name="Shade" CornerRadius="0,0,4,4" Opacity="1" >
								<Border.Background>
									<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
										<GradientStop Color="#FF351409" Offset="0"/>
										<GradientStop Color="#FFA51409" Offset="0.35"/>
										<GradientStop Color="#FFA51409" Offset="0.65"/>
										<GradientStop Color="#FF351409" Offset="1"/>
									</LinearGradientBrush>
								</Border.Background>

								<!-- BackColor -->
								<Border x:Name="BackColor" CornerRadius="0,0,4,4" >
									<Border.Background>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#AFFF2F00" Offset="0"/>
											<GradientStop Color="#8FDE8F7D" Offset="1"/>
										</LinearGradientBrush>
									</Border.Background>
									<Border.Effect>
										<BlurEffect Radius="1" />
									</Border.Effect>

									<!-- Glass -->
									<Border x:Name="Glass" CornerRadius="0,0,4,4" >
										<Border.Effect>
											<BlurEffect Radius="1"/>
										</Border.Effect>
										<Border.Background>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#AFFFFFFF" Offset="0.0"/>
												<GradientStop Color="#3FFFFFFF" Offset="0.5000000"/>
												<GradientStop Color="#0FFFFFFF" Offset="0.5000001"/>
												<GradientStop Color="#0FFFFFFF" Offset="1.0000000"/>
											</LinearGradientBrush>
										</Border.Background>
									</Border>
								</Border>
							</Border>
						</Border>

						<!-- PressedButtonColor -->
						<Border x:Name="PressedButtonColor" BorderBrush="#9F000000" BorderThickness="1,0,1,1" CornerRadius="0,0,4,4" Visibility="Collapsed" >

							<!-- PressedShade -->
							<Border x:Name="PressedShade" CornerRadius="0,0,4,4" Opacity="1" >
								<Border.Background>
									<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
										<GradientStop Color="#FF351409" Offset="0"/>
										<GradientStop Color="#FFA51409" Offset="0.35"/>
										<GradientStop Color="#FFA51409" Offset="0.65"/>
										<GradientStop Color="#FF351409" Offset="1"/>
									</LinearGradientBrush>
								</Border.Background>

								<!-- PressedBackColor -->
								<Border x:Name="PressedBackColor" CornerRadius="0,0,4,4" >
									<Border.Background>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#AFFF2F00" Offset="0"/>
											<GradientStop Color="#8FDE8F7D" Offset="1"/>
										</LinearGradientBrush>
									</Border.Background>
									<Border.Effect>
										<BlurEffect Radius="1" />
									</Border.Effect>

									<!-- PressedGlass -->
									<Border x:Name="PressedGlass" CornerRadius="0,0,4,4" >
										<Border.Effect>
											<BlurEffect Radius="1"/>
										</Border.Effect>
										<Border.Background>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#BFFFFFFF" Offset="0.0"/>
												<GradientStop Color="#4FFFFFFF" Offset="0.5000000"/>
												<GradientStop Color="#10FFFFFF" Offset="0.5000001"/>
												<GradientStop Color="#10FFFFFF" Offset="1.0000000"/>
											</LinearGradientBrush>
										</Border.Background>
									</Border>
								</Border>
							</Border>
						</Border>

						<!-- InnerBorder -->
						<Border x:Name="InnerBorder" Margin="1,0,1,1" BorderThickness="0.5,1,0.5,0.5" CornerRadius="0,0,3.5,3.5" BorderBrush="#FFFFFFFF">

						</Border>

						<!-- InnerShade -->
						<Rectangle x:Name="InnerShade" Height="Auto" Width="Auto" StrokeThickness="0" Margin="1" RadiusX="3" RadiusY="3">
							<Rectangle.Fill>
								<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5">
									<RadialGradientBrush.RelativeTransform>
										<TransformGroup>
											<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.00" ScaleY="0.5"/>
											<SkewTransform AngleX="1" CenterX="0.5" CenterY="0.5"/>
											<RotateTransform CenterX="0.5" CenterY="0.5"/>
											<TranslateTransform Y="0.5"/>
										</TransformGroup>
									</RadialGradientBrush.RelativeTransform>
									<GradientStop Color="#10FFFFFF" Offset="0.3595"/>
									<GradientStop Color="#00DE8F7D" Offset="1"/>
								</RadialGradientBrush>
							</Rectangle.Fill>
						</Rectangle>

						<!-- GoldenGlow -->
						<Rectangle x:Name="GoldenGlow" Height="Auto" Width="Auto" StrokeThickness="0" Margin="1" RadiusX="3" RadiusY="3" Visibility="Collapsed">
							<Rectangle.Fill>
								<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.3" RadiusY="0.3">
									<RadialGradientBrush.RelativeTransform>
										<TransformGroup>
											<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.00" ScaleY="0.5"/>
											<SkewTransform AngleX="1" CenterX="0.5" CenterY="0.5"/>
											<RotateTransform CenterX="0.5" CenterY="0.5"/>
											<TranslateTransform Y="0.5"/>
										</TransformGroup>
									</RadialGradientBrush.RelativeTransform>
									<GradientStop Color="#FFFFDD00" Offset="0.3595"/>
									<GradientStop Color="#40FF4614" Offset="1"/>
								</RadialGradientBrush>
							</Rectangle.Fill>
							<Rectangle.Effect>
								<BlurEffect Radius="2"/>
							</Rectangle.Effect>
						</Rectangle>

						<!-- XPath -->
						<Path x:Name="XPath"
										Margin="1.5,0,0,2"
										Height="9.5" Width="10.5" 
										Stretch="Fill"
										Stroke="#FF404040" StrokeThickness="0.75"
										Data="M0.5,0.5 L4.5178828,0.5 L6.0620003,3.125 L7.4936447,0.5 L11.5,0.5 L11.5,1.5476431 L8.7425003,6.1201854 L11.5,10.359666 L11.5,11.5 L7.4941902,11.5 L6.0620003,8.8740005 L4.5172949,11.5 L0.5,11.5 L0.5,10.43379 L3.3059995,6.1201582 L0.5,1.4676378 L0.5,0.5 z">
							<Path.Fill>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFF9F9F9" Offset="0.5"/>
									<GradientStop Color="#FFD4D4D6" Offset="1"/>
								</LinearGradientBrush>
							</Path.Fill>
						</Path>

					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- ActionButton -->
	<Style TargetType="interlink:ActionButton">
		<Setter Property="Foreground" Value="#FF000000"/>
		<Setter Property="Padding" Value="6,3,6,3"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="interlink:ActionButton">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimation Duration="0" Storyboard.TargetName="HoverVisualElement" Storyboard.TargetProperty="Opacity" To="1"/>
										<DoubleAnimation Duration="0" Storyboard.TargetName="HoverVisualElement2" Storyboard.TargetProperty="Opacity" To="1"/>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<DoubleAnimation Duration="0" Storyboard.TargetName="HoverVisualElement" Storyboard.TargetProperty="Opacity" To="1"/>
										<DoubleAnimation Duration="0" Storyboard.TargetName="PressedVisualElement" Storyboard.TargetProperty="Opacity" To="0.75"/>
										<DoubleAnimation Duration="0" Storyboard.TargetName="PressedVisualElement2" Storyboard.TargetProperty="Opacity" To="1"/>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PressedBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.55"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="contentPresenter">
											<EasingDoubleKeyFrame KeyTime="0" Value="0.75"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="contentPresenter">
											<EasingDoubleKeyFrame KeyTime="0" Value="0.5"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="1"/>
										<DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement2" Storyboard.TargetProperty="Opacity" To="1"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="PressedBackground" CornerRadius="2" Opacity="0" BorderThickness="0" Background="#FFC4DBEF" />
						<Border x:Name="HoverBackground" CornerRadius="3" Opacity="0" BorderThickness="0" >
							<Border.Background>
								<LinearGradientBrush StartPoint=".5,0" EndPoint=".5,1">
									<GradientStop Color="#FFFCFCFC" Offset="0.0"/>
									<GradientStop Color="#FFE8F2EF" Offset="0.500000000"/>
									<GradientStop Color="#FFCADDEF" Offset="0.500000001"/>
									<GradientStop Color="#FFC4DBEF" Offset="1"/>
								</LinearGradientBrush>
							</Border.Background>
						</Border>
						<TextBlock x:Name="contentPresenter"
								   Text="{TemplateBinding Content}"
								   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
								   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
								   Margin="{TemplateBinding Padding}">
							<TextBlock.RenderTransform>
								<TransformGroup>
									<ScaleTransform/>
									<SkewTransform/>
									<RotateTransform/>
									<TranslateTransform X="0" Y="0"/>
								</TransformGroup>
							</TextBlock.RenderTransform>
						</TextBlock>
						<TextBlock x:Name="DisabledOverlay"
									Text="{TemplateBinding Content}"
									Foreground="#FFAAAAAA"
									HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
									VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
									Margin="{TemplateBinding Padding}"
									Visibility="Collapsed" />
						<Rectangle x:Name="FocusVisualElement" RadiusX="2" RadiusY="2" Margin="0" Stroke="#FF82A5CB" StrokeThickness="1" Opacity="0" IsHitTestVisible="false" />
						<Rectangle x:Name="FocusVisualElement2" RadiusX="2" RadiusY="2" Margin="1" Stroke="#9FFFFFFF" StrokeThickness="1" Opacity="0" IsHitTestVisible="false" />
						<Rectangle x:Name="HoverVisualElement" RadiusX="2" RadiusY="2" Margin="0" Stroke="#FF82A5CB" StrokeThickness="1" Opacity="0" IsHitTestVisible="false" />
						<Rectangle x:Name="HoverVisualElement2" RadiusX="2" RadiusY="2" Margin="1" Stroke="#9FFFFFFF" StrokeThickness="1" Opacity="0" IsHitTestVisible="false" />
						<Border x:Name="PressedVisualElement" CornerRadius="2" Margin="1" BorderBrush="#FFC0D2EC" BorderThickness="0,2,0,0" Opacity="0" IsHitTestVisible="false" />
						<Rectangle x:Name="PressedVisualElement2" RadiusX="2" RadiusY="2" Margin="1" Stroke="#FFC4DBEF" StrokeThickness="1" Opacity="0" IsHitTestVisible="false" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- UploadListHeaderStyle -->
	<Style x:Key="UploadListHeaderStyle" TargetType="Border">
		<Setter Property="BorderThickness" Value="0,0,1,0" />
		<Setter Property="BorderBrush">
			<Setter.Value>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF79ACF1" Offset="0" />
					<GradientStop Color="#10C2DCFF" Offset="1" />
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- UploadFileDialog ControlTemplate -->
	<ControlTemplate x:Key="UploadFileDialogTemplate" TargetType="interlink:UploadFileDialog">
		<Canvas x:Name="Root" Background="Transparent" Margin="0" >
			<VisualStateManager.VisualStateGroups>
				<!-- WindowStates -->
				<VisualStateGroup x:Name="WindowStates">
					<VisualState x:Name="Open">
						<Storyboard>
							<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
								<EasingDoubleKeyFrame KeyTime="0" Value="0" />
								<EasingDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.85" />
								<SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.85" />
								<SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Closed">
						<Storyboard>
							<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
								<EasingDoubleKeyFrame KeyTime="0" Value="1" />
								<EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="0" />
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
								<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0.75" />
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
								<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0.75" />
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
				<!-- UploadingStates -->
				<VisualStateGroup x:Name="UploadingStates">
					<VisualState x:Name="NotStarted">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="spNoFileComment" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Pending">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>True</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnUpload" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>True</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="PendingSingleFile">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>False</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>True</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnUpload" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>True</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="InProgress">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grdStatus" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>False</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnUpload" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>False</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnCancel" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Cancel"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnCancelToolTip" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Cancel the current upload."/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Canceled">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>True</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Reset"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>False</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowseToolTip" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Clear the list and browse for file(s)."/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Completed">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>True</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Reset"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>False</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowseToolTip" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Clear the list and browse for file(s)."/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="PartialComplete">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>True</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Reset"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(Control.IsEnabled)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<System:Boolean>False</System:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowseToolTip" Storyboard.TargetProperty="(ContentControl.Content)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Clear the list and browse for file(s)."/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="CompletedDone">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnUpload" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="PartialCompleteDone">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnUpload" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="CanceledDone">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnBrowse" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnUpload" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="00:00:00">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<Grid x:Name="Overlay" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" Background="{TemplateBinding OverlayBrush}" Opacity="{TemplateBinding OverlayOpacity}"/>
			<Grid x:Name="ContentRoot" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">

				<Grid.Resources>
					<interlink:TransferRateConverter x:Key="TransferRateConverter"/>
					<interlink:ByteConverter x:Key="ByteConverter"/>
					<interlink:PercentageConverter x:Key="PercentageConverter"/>
					<interlink:TimeConverter x:Key="TimeConverter"/>
				</Grid.Resources>
				<Grid.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Grid.RenderTransform>

				<!-- Blurred Border -->
				<Border x:Name="Blurred" BorderBrush="Black" Margin="-3" BorderThickness="1,1,4,4" CornerRadius="7,9,8,7" IsHitTestVisible="False" Background="#AFFFFFFF">
					<Border.Effect>
						<BlurEffect Radius="14"/>
					</Border.Effect>
				</Border>
				<!-- InnerBlurred Border -->
				<Border x:Name="InnerBlurred" BorderBrush="Black" Margin="-1" BorderThickness="1" CornerRadius="7,9,8,7" IsHitTestVisible="False">
					<Border.Effect>
						<BlurEffect Radius="7"/>
					</Border.Effect>
				</Border>
				<!-- MainBackground -->
				<Border x:Name="MainBackground" BorderBrush="Black" BorderThickness="1" CornerRadius="7" Margin="0" IsHitTestVisible="False" >
					<Border.Background>
						<RadialGradientBrush GradientOrigin="0.5,0.5">
							<RadialGradientBrush.RelativeTransform>
								<TransformGroup>
									<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.75" ScaleX="1.75"/>
									<SkewTransform CenterY="0.5" CenterX="0.5"/>
									<RotateTransform CenterY="0.5" CenterX="0.5"/>
									<TranslateTransform Y="0.175"/>
								</TransformGroup>
							</RadialGradientBrush.RelativeTransform>
							<GradientStop Color="#FFB7CAD4" Offset="0.75"/>
							<GradientStop Color="#9FFFFFFF" Offset="1"/>
						</RadialGradientBrush>
					</Border.Background>
				</Border>
				<!-- MainBorder -->
				<Border x:Name="MainBorder" BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="6" Margin="1">
					<!-- WindowContentGrid -->
					<Grid x:Name="WindowContentGrid" Opacity="1" >
						<Grid.Background>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#00FFFFFF" Offset="0"/>
								<GradientStop Color="#DFFFFFFF" Offset="0.408"/>
								<GradientStop Color="#02FFFFFF" Offset="0.420"/>
							</LinearGradientBrush>
						</Grid.Background>
						<Grid.RowDefinitions>
							<RowDefinition Height="26" />
							<RowDefinition/>
						</Grid.RowDefinitions>
						<!-- Chrome (TitleBar) -->
						<Grid x:Name="Chrome" Height="Auto" Width="Auto" Background="Transparent">
							<Grid.ColumnDefinitions>
								<ColumnDefinition/>
								<ColumnDefinition Width="54"/>
							</Grid.ColumnDefinitions>
							<StackPanel Grid.Column="0" Orientation="Horizontal">
								<Image x:Name="TitleImage" Source="{TemplateBinding TitleImageSource}" HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="16" Width="16" Margin="5,0,0,0" />
								<ContentPresenter HorizontalAlignment="Stretch" Margin="5,0,5,0" VerticalAlignment="Center">
									<Grid>
										<Grid.ColumnDefinitions>
											<ColumnDefinition Width="Auto"/>
										</Grid.ColumnDefinitions>
										<Border Background="#AFFFFFFF" Margin="-2,-1,-2,-1">
											<Border.Effect>
												<BlurEffect Radius="14"/>
											</Border.Effect>
										</Border>
										<TextBlock Foreground="#D7000000" FontFamily="{TemplateBinding FontFamily}" Text="{TemplateBinding Title}" />
									</Grid>
								</ContentPresenter>
							</StackPanel>
							<Border x:Name="Buttons" Grid.Column="1" Height="20" Margin="0,-1,4,0" VerticalAlignment="Top" Background="Transparent" BorderBrush="#A0FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5" >
								<interlink:DialogCloseButton x:Name="CloseButton" IsTabStop="False"/>
							</Border>
						</Grid>
						<!-- Content -->
						<Border Grid.Row="1" Margin="4,0,4,4" BorderBrush="#8FFFFFFF" BorderThickness="1" CornerRadius="2">
							<Border Background="White" Margin="0" BorderBrush="#AF000000" BorderThickness="1" CornerRadius="1">
								<Grid x:Name="ContentGrid" Background="White" Height="420" MinHeight="420" Width="500" MinWidth="500">

									<Grid.RowDefinitions>
										<!--Actions-->
										<RowDefinition Height="Auto" />
										<!--Comment-->
										<RowDefinition Height="Auto" />
										<!--Header-->
										<RowDefinition Height="Auto" />
										<!--List-->
										<RowDefinition Height="*" />
										<!--Footer-->
										<RowDefinition Height="24" />
									</Grid.RowDefinitions>

									<!--Row0: Actions-->
									<Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="#FFA0AFC3">
										<Border BorderThickness="0,0,0,1" BorderBrush="#FFCDDAEA">
											<Border BorderThickness="1,2,1,1" >
												<Border.BorderBrush>
													<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
														<GradientStop Color="#FFF4F6FA" Offset="0" />
														<GradientStop Color="#FFE9F0F0" Offset="1" />
													</LinearGradientBrush>
												</Border.BorderBrush>
												<Border.Background>
													<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" Opacity="1" >
														<GradientStop Color="#FFF4F6FA"/>
														<GradientStop Color="#FFE9F0F0" Offset="0.50000000"/>
														<GradientStop Color="#FFDCE6F4" Offset="0.50000001"/>
														<GradientStop Color="#FFDCE7F5" Offset="1"/>
													</LinearGradientBrush>
												</Border.Background>
												<Grid>
													<Grid.ColumnDefinitions>
														<ColumnDefinition Width="73" />
														<ColumnDefinition Width="73" />
														<ColumnDefinition Width="73" />
														<ColumnDefinition/>
													</Grid.ColumnDefinitions>
													<Grid.RowDefinitions>
														<RowDefinition Height="26"/>
													</Grid.RowDefinitions>
													<interlink:ActionButton Grid.Column="0" x:Name="btnBrowse" Content="Browse" Margin="2,1,2,1">
														<ToolTipService.ToolTip>
															<ToolTip x:Name="btnBrowseToolTip" Content="Browse for one or more file(s)."></ToolTip>
														</ToolTipService.ToolTip>
													</interlink:ActionButton>
													<interlink:ActionButton Grid.Column="1" x:Name="btnUpload" Content="Upload" Margin="2,1,2,1" ToolTipService.ToolTip="Begin uploading the selected file(s)." IsEnabled="False" />
													<interlink:ActionButton Grid.Column="2" x:Name="btnClearAll" Content="Clear All" Margin="2,1,2,1" ToolTipService.ToolTip="Clear the existing file(s)." IsEnabled="False" />
													<interlink:ActionButton Grid.Column="3" x:Name="btnCancel" Content="Close" Margin="2,1,2,1" Width="63" HorizontalAlignment="Right">
														<ToolTipService.ToolTip>
															<ToolTip x:Name="btnCancelToolTip" Content="Close this dialog window."></ToolTip>
														</ToolTipService.ToolTip>
													</interlink:ActionButton>
												</Grid>
											</Border>
										</Border>
									</Border>

									<!-- Row1: Comment -->
									<StackPanel Grid.Row="1">
										<TextBlock Text="{TemplateBinding FolderName}" TextWrapping="Wrap" FontSize="14" Foreground="DarkGreen" Margin="8,5,5,5" VerticalAlignment="Center"/>
										<TextBlock Text="{TemplateBinding Comment}" TextWrapping="Wrap" Foreground="Gray" Margin="8,1,5,5" VerticalAlignment="Center"/>
									</StackPanel>

									<!-- Row2: List Headers -->
									<StackPanel Grid.Row="2" Margin="0,0,0,4">
										<Border BorderThickness="0,1,0,0" Margin="0">
											<Border.BorderBrush>
												<SolidColorBrush Opacity="0.5" Color="#FF7DA2CE"/>
											</Border.BorderBrush>
											<Border.Background>
												<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" Opacity="1" >
													<GradientStop Color="#0FFFFFFF" Offset="1"/>
													<GradientStop Color="#9FF4F6FA"/>
												</LinearGradientBrush>
											</Border.Background>
											<StackPanel Orientation="Horizontal" Height="24" VerticalAlignment="Bottom" Margin="0" >
												<Border HorizontalAlignment="Left" Style="{StaticResource UploadListHeaderStyle}">
													<TextBlock Foreground="#FF1E0437" Text="File" VerticalAlignment="Center" TextAlignment="Left" Width="230" Margin="5,0,10,0" x:Name="txbFileHeader" FontWeight="Bold" FontSize="9.5" />
												</Border>
												<Border Width="60" Style="{StaticResource UploadListHeaderStyle}">
													<TextBlock Foreground="#FF1E0437" Text=" State" VerticalAlignment="Center" TextAlignment="Left" FontWeight="Bold" FontSize="9.5" />
												</Border>
												<Border Width="70" Style="{StaticResource UploadListHeaderStyle}">
													<TextBlock Foreground="#FF1E0437" Text=" Size" VerticalAlignment="Center" TextAlignment="Left" FontWeight="Bold" FontSize="9.5" />
												</Border>
												<Border Width="65" Style="{StaticResource UploadListHeaderStyle}">
													<TextBlock Foreground="#FF1E0437" Text=" Progress" VerticalAlignment="Center" TextAlignment="Left" FontWeight="Bold" FontSize="9.5" />
												</Border>
												<Border Width="45" Style="{StaticResource UploadListHeaderStyle}" BorderThickness="0,0,0,0" >
													<TextBlock Foreground="#FF1E0437" Text=" Action" VerticalAlignment="Center" TextAlignment="Left" FontWeight="Bold" FontSize="9.5" />
												</Border>
											</StackPanel>
										</Border>
									</StackPanel>

									<!-- Row3: FileList -->
									<ListBox Grid.Row="3" x:Name="FileList" Margin="0,0,0,1" BorderThickness="0" ItemsSource="{Binding Files}" SelectedItem="{Binding SelectedFile, Mode=TwoWay}">
										<ListBox.ItemsPanel>
											<ItemsPanelTemplate>
												<StackPanel Margin="1" />
											</ItemsPanelTemplate>
										</ListBox.ItemsPanel>
										<ListBox.ItemTemplate>
											<DataTemplate>
												<interlink:UploadFileView />
											</DataTemplate>
										</ListBox.ItemTemplate>
									</ListBox>

									<!-- Row3: No Files -->
									<StackPanel Grid.Row="3" x:Name="spNoFileComment" VerticalAlignment="Top" Margin="20" Visibility="Collapsed" IsHitTestVisible="False" >
										<TextBlock Text="No files selected" VerticalAlignment="Top" TextAlignment="Center" TextWrapping="Wrap" IsHitTestVisible="False"/>
										<TextBlock Text="{TemplateBinding NoFilesText}" TextAlignment="Left" VerticalAlignment="Center" TextWrapping="Wrap" Margin="20,40,0,0" IsHitTestVisible="False"/>
									</StackPanel>

									<!-- Row4: List Footer -->
									<Border Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="#FFA0AFC3">
										<Border BorderThickness="0,1,0,0" BorderBrush="#FFCDDAEA">
											<Border BorderThickness="1,1,1,2" Background="#FFF2F3F5" >
												<Border.BorderBrush>
													<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
														<GradientStop Color="#FFF4F6FA" Offset="0" />
														<GradientStop Color="#FFE9F0F0" Offset="1" />
													</LinearGradientBrush>
												</Border.BorderBrush>
												<!--Footer-->
												<Grid Margin="5,0,0,0">
													<Grid.ColumnDefinitions>
														<ColumnDefinition Width="*"/>
														<ColumnDefinition Width="200"/>
														<ColumnDefinition Width="80"/>
													</Grid.ColumnDefinitions>

													<!-- Status -->
													<TextBlock Grid.Column="0" x:Name="lblResultsMessage" VerticalAlignment="Center" Text="Ready" Foreground="Black" />

													<!-- Overall progress -->
													<Grid Grid.Column="1" x:Name="grdStatus" Visibility="Collapsed" Margin="1,2,1,1">
														<ProgressBar x:Name="prgTotalProgress" Value="{Binding Percentage}" Minimum="0" Maximum="100" SmallChange="1" LargeChange="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsTabStop="False"/>
														<TextBlock x:Name="txtTotalProgress" Text="{Binding Percentage, Converter={StaticResource PercentageConverter}}" FontSize="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextAlignment="Center" Margin="0,1,0,0"/>
													</Grid>

													<!-- FileCount -->
													<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
														<TextBlock Text=" | Files: "/>
														<TextBlock x:Name="txtFilesCount" Text="{Binding Files.Count, Mode=OneWay}"/>
													</StackPanel>
												</Grid>
											</Border>
										</Border>
									</Border>

								</Grid>
							</Border>
						</Border>
					</Grid>
				</Border>

				<!-- Resize Thumbs -->
				<Thumb x:Name="W" Style="{StaticResource WindowSizerThumb}" Cursor="SizeWE" HorizontalAlignment="Left" Width="6" Margin="2,8,0,8" />
				<Thumb x:Name="N" Style="{StaticResource WindowSizerThumb}" Cursor="SizeNS" VerticalAlignment="Top" Height="6" Margin="14,2,57,0" />
				<Thumb x:Name="E" Style="{StaticResource WindowSizerThumb}" Cursor="SizeWE" HorizontalAlignment="Right" Width="5" Margin="0,8,2,8" />
				<Thumb x:Name="S" Style="{StaticResource WindowSizerThumb}" Cursor="SizeNS" VerticalAlignment="Bottom" Height="6" Margin="14,0,14,2" />
				<Thumb x:Name="NW" Style="{StaticResource WindowSizerThumb}" Cursor="SizeNWSE" VerticalAlignment="Top" HorizontalAlignment="Left" Height="6" Width="12" Margin="2,2,0,0" />
				<Thumb x:Name="NE" Style="{StaticResource WindowSizerThumb}" Cursor="SizeNESW" VerticalAlignment="Top" HorizontalAlignment="Right" Height="6" Width="5" Margin="0,2,2,0" />
				<Thumb x:Name="SE" Style="{StaticResource WindowSizerThumb}" Cursor="SizeNWSE" VerticalAlignment="Bottom" HorizontalAlignment="Right" Height="5" Width="11" Margin="0,0,3,3" />
				<Thumb x:Name="SW" Style="{StaticResource WindowSizerThumb}" Cursor="SizeNESW" VerticalAlignment="Bottom" HorizontalAlignment="Left" Height="6" Width="12" Margin="2,0,0,2" />

			</Grid>
		</Canvas>
	</ControlTemplate>

	<!-- UploadFileDialog -->
	<Style TargetType="interlink:UploadFileDialog">
		<Setter Property="IsTabStop" Value="True" />
		<Setter Property="TabNavigation" Value="Local" />
		<Setter Property="HorizontalAlignment" Value="Center" />
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="VerticalContentAlignment" Value="Stretch" />
		<Setter Property="MinWidth" Value="500" />
		<Setter Property="MinHeight" Value="420" />
		<Setter Property="OverlayBrush">
			<Setter.Value>
				<SolidColorBrush Color="#00FFFFFF" />
			</Setter.Value>
		</Setter>
		<Setter Property="OverlayOpacity" Value="1" />
		<Setter Property="Template" Value="{StaticResource UploadFileDialogTemplate}" />
	</Style>

	<!-- UploadFileDetail -->
	<Style TargetType="interlink:UploadFileDetail">
		<Setter Property="IsTabStop" Value="false" />
		<Setter Property="TabNavigation" Value="Cycle" />
		<Setter Property="Title" Value="File Detail" />
		<Setter Property="OverlayBrush">
			<Setter.Value>
				<SolidColorBrush Color="#00FFFFFF" />
			</Setter.Value>
		</Setter>
		<Setter Property="OverlayOpacity" Value="1" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="interlink:UploadFileDetail">
					<Grid x:Name="Root" Margin="0">
						<VisualStateManager.VisualStateGroups>
							<!-- WindowStates -->
							<VisualStateGroup x:Name="WindowStates">
								<VisualState x:Name="Open">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
											<EasingDoubleKeyFrame KeyTime="0" Value="0" />
											<EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.75" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
											<SplineDoubleKeyFrame KeyTime="00:00:00.05" Value="0.25" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Closed">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
											<EasingDoubleKeyFrame KeyTime="0" Value="1" />
											<EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="0" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0.75" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
											<SplineDoubleKeyFrame KeyTime="00:00:00.05" Value="1" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0.25" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid x:Name="Overlay" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0" Background="{TemplateBinding OverlayBrush}" Opacity="{TemplateBinding OverlayOpacity}" />
						<Grid x:Name="ContentRoot" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
							<Grid.RenderTransform>
								<TransformGroup>
									<ScaleTransform/>
									<SkewTransform/>
									<RotateTransform/>
									<TranslateTransform/>
								</TransformGroup>
							</Grid.RenderTransform>
							<!-- Blurred Border -->
							<Border x:Name="Blurred" BorderBrush="Black" Margin="-3" BorderThickness="1,1,4,4" CornerRadius="7,9,8,7" IsHitTestVisible="False" Background="#AFFFFFFF">
								<Border.Effect>
									<BlurEffect Radius="14"/>
								</Border.Effect>
							</Border>
							<!-- InnerBlurred Border -->
							<Border x:Name="InnerBlurred" BorderBrush="Black" Margin="-1" BorderThickness="1" CornerRadius="7,9,8,7" IsHitTestVisible="False">
								<Border.Effect>
									<BlurEffect Radius="7"/>
								</Border.Effect>
							</Border>
							<!-- MainBackground -->
							<Border x:Name="MainBackground" BorderBrush="Black" BorderThickness="1" CornerRadius="7" Margin="0" IsHitTestVisible="False" >
								<Border.Background>
									<RadialGradientBrush GradientOrigin="0.5,0.5">
										<RadialGradientBrush.RelativeTransform>
											<TransformGroup>
												<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.75" ScaleX="1.75"/>
												<SkewTransform CenterY="0.5" CenterX="0.5"/>
												<RotateTransform CenterY="0.5" CenterX="0.5"/>
												<TranslateTransform Y="0.175"/>
											</TransformGroup>
										</RadialGradientBrush.RelativeTransform>
										<GradientStop Color="#CF3F8B28" Offset="0.75"/>
										<GradientStop Color="#9FFFFFFF" Offset="1"/>
									</RadialGradientBrush>
								</Border.Background>
							</Border>
							<!-- MainBorder -->
							<Border x:Name="MainBorder" BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="6" Margin="1">
								<!-- WindowContentGrid -->
								<Grid x:Name="WindowContentGrid" Opacity="1" >
									<Grid.Background>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#00FFFFFF" Offset="0"/>
											<GradientStop Color="#DFFFFFFF" Offset="0.408"/>
											<GradientStop Color="#02FFFFFF" Offset="0.420"/>
										</LinearGradientBrush>
									</Grid.Background>
									<Grid.RowDefinitions>
										<RowDefinition Height="26" />
										<RowDefinition/>
									</Grid.RowDefinitions>
									<!-- Chrome (TitleBar) -->
									<Grid x:Name="Chrome" Height="Auto" Width="Auto" Background="Transparent">
										<Grid.ColumnDefinitions>
											<ColumnDefinition/>
											<ColumnDefinition Width="54"/>
										</Grid.ColumnDefinitions>
										<StackPanel Grid.Column="0" Orientation="Horizontal">
											<ContentPresenter HorizontalAlignment="Stretch" Margin="5,0,5,0" VerticalAlignment="Center">
												<Grid>
													<Grid.ColumnDefinitions>
														<ColumnDefinition Width="Auto"/>
													</Grid.ColumnDefinitions>
													<Border Background="#AFFFFFFF" Margin="-2,-1,-2,-1">
														<Border.Effect>
															<BlurEffect Radius="14"/>
														</Border.Effect>
													</Border>
													<TextBlock Foreground="#D7000000" FontFamily="{TemplateBinding FontFamily}" Text="{TemplateBinding Title}" />
												</Grid>
											</ContentPresenter>
										</StackPanel>
										<Border x:Name="Buttons" Grid.Column="1" Height="20" Margin="0,-1,4,0" VerticalAlignment="Top" Background="Transparent" BorderBrush="#A0FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5" >
											<interlink:DialogCloseButton x:Name="CloseButton" IsTabStop="False"/>
										</Border>
									</Grid>
									<!-- Content -->
									<Border Grid.Row="1" Margin="4,0,4,4" BorderBrush="#8FFFFFFF" BorderThickness="1" CornerRadius="2">
										<Border Background="White" Margin="0" BorderBrush="#AF000000" BorderThickness="1" CornerRadius="1">
											<Grid x:Name="LayoutRoot" Width="400" Height="266" >
												<Grid.Resources>
													<interlink:ByteConverter x:Key="ByteConverter"/>
													<interlink:PercentageConverter x:Key="PercentageConverter"/>
													<interlink:TransferRateConverter x:Key="TransferRateConverter"/>
													<interlink:TimeConverter x:Key="TimeConverter"/>
												</Grid.Resources>
												<Grid.RowDefinitions>
													<RowDefinition />
													<RowDefinition Height="Auto" />
												</Grid.RowDefinitions>
												<Grid x:Name="ResultsGrid" Background="White">

													<Grid.ColumnDefinitions>
														<ColumnDefinition Width="10"/>
														<ColumnDefinition Width="70"/>
														<ColumnDefinition Width="*"/>
														<ColumnDefinition Width="5"/>
													</Grid.ColumnDefinitions>

													<Grid.RowDefinitions>
														<RowDefinition Height="5"/>
														<RowDefinition Height="23"/>
														<RowDefinition Height="23"/>
														<RowDefinition Height="23"/>
														<RowDefinition Height="23"/>
														<RowDefinition Height="23"/>
														<RowDefinition Height="28"/>
														<RowDefinition Height="75"/>
														<RowDefinition Height="5"/>
													</Grid.RowDefinitions>

													<TextBlock Grid.Row="1" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" Text="File:" FontWeight="Bold" />
													<TextBlock Grid.Row="1" Grid.Column="2" Margin="5" VerticalAlignment="Center" Text="{Binding FileName}" />

													<TextBlock Grid.Row="2" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" Text="State:" FontWeight="Bold" />
													<TextBlock Grid.Row="2" Grid.Column="2" Margin="5" VerticalAlignment="Center" Text="{Binding State}" />

													<TextBlock Grid.Row="3" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" Text="Bytes:" FontWeight="Bold" />
													<StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="2" Margin="5" >
														<TextBlock VerticalAlignment="Center" Text="{Binding BytesUploaded, Converter={StaticResource ByteConverter}}" />
														<TextBlock VerticalAlignment="Center" Text=" of " />
														<TextBlock VerticalAlignment="Center" Text="{Binding FileLength, Converter={StaticResource ByteConverter}}" />
													</StackPanel >

													<TextBlock Grid.Row="4" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" Text="Elapsed:" FontWeight="Bold" />
													<TextBlock Grid.Row="4" Grid.Column="2" Margin="5" VerticalAlignment="Center" Text="{Binding ElapsedTime, Converter={StaticResource TimeConverter}}" />

													<TextBlock Grid.Row="5" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" Text="Rate:" FontWeight="Bold" />
													<TextBlock Grid.Row="5" Grid.Column="2" Margin="5" VerticalAlignment="Center" Text="{Binding TransferRate, Converter={StaticResource TransferRateConverter}}" />

													<TextBlock Grid.Row="6" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" Text="Progress:" FontWeight="Bold" />
													<Grid Grid.Row="6" Grid.Column="2" Margin="5">
														<ProgressBar Value="{Binding Percentage}" HorizontalAlignment="Stretch"/>
														<TextBlock Text="{Binding Percentage, Converter={StaticResource PercentageConverter}}" TextAlignment="Center"/>
													</Grid>

													<TextBlock Grid.Row="7" Grid.Column="1" Margin="5" VerticalAlignment="Top" HorizontalAlignment="Left" Text="Errors:" FontWeight="Bold" />
													<TextBox Grid.Row="7" Grid.Column="2" Margin="5" VerticalAlignment="Stretch" Text="{Binding LastException}" Foreground="Brown" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" TextWrapping="Wrap" IsReadOnly="True" x:Name="txtLastException" />

												</Grid>
												<Border Grid.Row="1" BorderThickness="0,1,0,0" Background="#FFF2F3F5" BorderBrush="#FFBDD0E6">
													<Button x:Name="btnClose" Content="OK" Width="65" Height="23" Margin="8" HorizontalAlignment="Right" />
												</Border>
											</Grid>
										</Border>
									</Border>
								</Grid>
							</Border>
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- DownloadFileDialog -->
	<Style TargetType="interlink:DownloadFileDialog">
		<Setter Property="IsTabStop" Value="false" />
		<Setter Property="TabNavigation" Value="Cycle" />
		<Setter Property="Title" Value="HSS Interlink: File Download" />
		<Setter Property="Width" Value="400" />
		<Setter Property="Height" Value="230" />
		<Setter Property="OverlayBrush">
			<Setter.Value>
				<SolidColorBrush Color="#00FFFFFF" />
			</Setter.Value>
		</Setter>
		<Setter Property="OverlayOpacity" Value="1" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="interlink:DownloadFileDialog">
					<Grid x:Name="Root">
						<VisualStateManager.VisualStateGroups>
							<!-- WindowStates -->
							<VisualStateGroup x:Name="WindowStates">
								<VisualState x:Name="Open">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
											<EasingDoubleKeyFrame KeyTime="0" Value="0" />
											<EasingDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.85" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.85" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Closed">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
											<EasingDoubleKeyFrame KeyTime="0" Value="1" />
											<EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="0" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0.75" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
											<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0.75" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid x:Name="Overlay" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0" Background="{TemplateBinding OverlayBrush}" Opacity="{TemplateBinding OverlayOpacity}" />
						<Grid x:Name="ContentRoot" Height="{TemplateBinding Height}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}" RenderTransformOrigin="0.5,0.5">
							<Grid.RenderTransform>
								<TransformGroup>
									<ScaleTransform/>
									<SkewTransform/>
									<RotateTransform/>
									<TranslateTransform/>
								</TransformGroup>
							</Grid.RenderTransform>
							<!-- Blurred Border -->
							<Border x:Name="Blurred" BorderBrush="Black" Margin="-3" BorderThickness="1,1,4,4" CornerRadius="7,9,8,7" IsHitTestVisible="False" Background="#AFFFFFFF">
								<Border.Effect>
									<BlurEffect Radius="14"/>
								</Border.Effect>
							</Border>
							<!-- InnerBlurred Border -->
							<Border x:Name="InnerBlurred" BorderBrush="Black" Margin="-1" BorderThickness="1" CornerRadius="7,9,8,7" IsHitTestVisible="False">
								<Border.Effect>
									<BlurEffect Radius="7"/>
								</Border.Effect>
							</Border>
							<!-- MainBackground -->
							<Border x:Name="MainBackground" BorderBrush="Black" BorderThickness="1" CornerRadius="7" Margin="0" IsHitTestVisible="False" >
								<Border.Background>
									<RadialGradientBrush GradientOrigin="0.5,0.5">
										<RadialGradientBrush.RelativeTransform>
											<TransformGroup>
												<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.75" ScaleX="1.75"/>
												<SkewTransform CenterY="0.5" CenterX="0.5"/>
												<RotateTransform CenterY="0.5" CenterX="0.5"/>
												<TranslateTransform Y="0.175"/>
											</TransformGroup>
										</RadialGradientBrush.RelativeTransform>
										<GradientStop Color="#CF3F8B28" Offset="0.75"/>
										<GradientStop Color="#9FFFFFFF" Offset="1"/>
									</RadialGradientBrush>
								</Border.Background>
							</Border>
							<!-- MainBorder -->
							<Border x:Name="MainBorder" BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="6" Margin="1">
								<!-- WindowContentGrid -->
								<Grid x:Name="WindowContentGrid" Opacity="1" >
									<Grid.Background>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#00FFFFFF" Offset="0"/>
											<GradientStop Color="#DFFFFFFF" Offset="0.408"/>
											<GradientStop Color="#02FFFFFF" Offset="0.420"/>
										</LinearGradientBrush>
									</Grid.Background>
									<Grid.RowDefinitions>
										<RowDefinition Height="26" />
										<RowDefinition/>
									</Grid.RowDefinitions>
									<!-- Chrome (TitleBar) -->
									<Grid x:Name="Chrome" Height="Auto" Width="Auto" Background="Transparent">
										<Grid.ColumnDefinitions>
											<ColumnDefinition/>
											<ColumnDefinition Width="54"/>
										</Grid.ColumnDefinitions>
										<StackPanel Grid.Column="0" Orientation="Horizontal">
											<Image x:Name="TitleImage" Source="{TemplateBinding TitleImageSource}" HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="16" Width="16" Margin="5,0,0,0" />
											<ContentPresenter HorizontalAlignment="Stretch" Margin="5,0,5,0" VerticalAlignment="Center">
												<Grid>
													<Grid.ColumnDefinitions>
														<ColumnDefinition Width="Auto"/>
													</Grid.ColumnDefinitions>
													<Border Background="#AFFFFFFF" Margin="-2,-1,-2,-1">
														<Border.Effect>
															<BlurEffect Radius="14"/>
														</Border.Effect>
													</Border>
													<TextBlock Foreground="#D7000000" FontFamily="{TemplateBinding FontFamily}" Text="{TemplateBinding Title}" />
												</Grid>
											</ContentPresenter>
										</StackPanel>
										<Border x:Name="Buttons" Grid.Column="1" Height="20" Margin="0,-1,4,0" VerticalAlignment="Top" Background="Transparent" BorderBrush="#A0FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5" >
											<interlink:DialogCloseButton x:Name="CloseButton" IsTabStop="False"/>
										</Border>
									</Grid>
									<!-- Content -->
									<Border Grid.Row="1" Margin="4,0,4,4" BorderBrush="#8FFFFFFF" BorderThickness="1" CornerRadius="2">
										<Border Background="White" Margin="0" BorderBrush="#AF000000" BorderThickness="1" CornerRadius="1">
											<Grid x:Name="LayoutRoot" Background="#FFF4F7FF">
												<Grid.RowDefinitions>
													<RowDefinition />
													<RowDefinition Height="Auto" />
												</Grid.RowDefinitions>
												<Grid x:Name="gridContentDetail" Background="White">
													<Grid.RowDefinitions>
														<RowDefinition Height="Auto" />
														<RowDefinition Height="Auto" />
														<RowDefinition Height="Auto" />
														<RowDefinition />
													</Grid.RowDefinitions>
													<StackPanel Orientation="Horizontal">
														<Image x:Name="DownloadImage" Source="{TemplateBinding DownloadImageSource}" Height="24" HorizontalAlignment="Left" Margin="15,15,35,15" />
														<TextBlock x:Name="txtResult" Text="Download Complete" VerticalAlignment="Center" Visibility="Collapsed" />
													</StackPanel>
													<TextBlock Grid.Row="1" Text="{Binding SaveAsFileName}" Margin="15,5,15,0"/>
													<Grid Grid.Row="2" Height="16" Margin="15,4,15,5">
														<ProgressBar x:Name="progressPercentage" Value="{Binding Percentage}" />
														<TextBlock Text="{Binding PercentageFormatted}" FontSize="9" TextAlignment="Center" VerticalAlignment="Center"/>
													</Grid>
													<Grid Grid.Row="3" Margin="15,0,15,0">

														<Grid.ColumnDefinitions>
															<ColumnDefinition Width="110" />
															<ColumnDefinition />
														</Grid.ColumnDefinitions>

														<Grid.RowDefinitions>
															<RowDefinition Height="Auto" />
															<RowDefinition Height="Auto" />
															<RowDefinition Height="Auto" />
														</Grid.RowDefinitions>

														<TextBlock Grid.Column="0" Grid.Row="0" Text="Downloaded: " FontFamily="Lucida Sans Unicode" FontSize="11" />
														<TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding Activity}" FontFamily="Lucida Sans Unicode" FontSize="11" />

														<TextBlock Grid.Column="0" Grid.Row="1" Text="Download to: " FontFamily="Lucida Sans Unicode" FontSize="11" />
														<TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding SaveAsFileName}" FontFamily="Lucida Sans Unicode" FontSize="11"/>

														<TextBlock Grid.Column="0" Grid.Row="2" Text="Transfer rate: " FontFamily="Lucida Sans Unicode" FontSize="11" />
														<TextBlock Grid.Column="1" Grid.Row="2" Text="{Binding TransferRateFormatted}" FontFamily="Lucida Sans Unicode" FontSize="11" />

													</Grid>
												</Grid>
												<Grid Grid.Row="1" Margin="6,8,6,8">
													<CheckBox x:Name="ckbCloseWhenCompleted" Content="Close when download completes?" Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
													<Button x:Name="btnClose" Content="Cancel" Width="65" Height="23" Margin="297,0,8,0" />
												</Grid>
											</Grid>
										</Border>
									</Border>
								</Grid>
							</Border>
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>
